Transcoding method and device for audio/video stream

ABSTRACT

The present invention provides a transcoding method and a device for audio/video streams. The method includes: acquiring an audio/video source stream from a source server, and when transcoding the audio/video source stream, designating a preset encapsulation format as an encapsulation format of the audio/video source stream; analyzing header data of the audio/video source stream to obtain configuration information of the audio/video source stream, and respectively initializing a video decoder and an audio decoder according to the configuration information; and decoding the audio/video source stream using the initialized video decoder and audio decoder, re-encoding decoded audio/video data as a target audio/video stream, and pushing the target audio/video stream to a live broadcast server. The transcoding method and device for audio/video streams provided by the present disclosure may improve the transcoding speed.

FIELD OF THE INVENTION

The present invention generally relates to the technical field ofaudio/video processing and, more particularly, relates to a transcodingmethod and a device for audio/video streams.

BACKGROUND

With the continuous development of Internet technology, the dominantcontents in the Internet have gradually developed from words, picturesto audio/video. Currently, due to a variety of audio/video formats, theaudio/video formats uploaded to the Internet by different users may notbe same. However, the client playing audio/video may not be able toadapt to all audio/video formats. Therefore, before providingaudio/video to the client, the audio/video formats may be generallyconverted to the formats supported by the client, so the client mayproperly play received audio/video.

Referring to FIG. 1, currently, the audio/video transcoding maygenerally include multiple processes such as protocol analysis, streaminformation analysis, decoding and encoding, where the protocol analysisprocess may need time to identify encapsulation formats of audio/videosource streams. In addition, the protocol analysis stage may also needmore time to determine parameters of the audio/video source streams. Forexample, when the fast forward moving picture experts group (ffmpeg)transcoding process performs the stream information analysis on anaudio/video source stream in flash video (FLV) encapsulation format, itmay be generally required to acquire at least 40 frames of video datafrom the audio/video source stream, so the frame rate corresponding tothe audio/video source stream may be identified. In such way, theprocess of loading 40 frames of video data may seriously affect theefficiency of the entire transcoding.

It can be seen that the transcoding process in the existing technologymay waste relatively large amount of time in multiple stages, resultingin a relatively slow transcoding speed and a relatively long waitingtime for the users.

BRIEF SUMMARY OF THE INVENTION

The purpose of the present disclosure is to provide a transcoding methodand a device for audio/video streams, which may improve the transcodingspeed.

To achieve above purpose, in one aspect, the present disclosure providesa transcoding method for audio/video streams. The method includes:acquiring an audio/video source stream from a source server, and whentranscoding the audio/video source stream, designating a presetencapsulation format as the encapsulation format of the audio/videosource stream; analyzing header data of the audio/video source stream toobtain configuration information of the audio/video source stream, andrespectively initializing a video decoder and an audio decoder accordingto the configuration information; and decoding the audio/video sourcestream using the initialized video decoder and audio decoder,re-encoding the decoded audio/video data as a target audio/video stream,and pushing the target audio/video stream to the live broadcast server.

To achieve above purpose, in another aspect, the present disclosureprovides a transcoding device. The device includes an encapsulationformat configurating unit, configured to acquire an audio/video sourcestream from a source server, and designate a preset encapsulation formatas an encapsulation format of the audio/video source stream whentranscoding the audio/video source stream; a decoder initializing unit,configured to analyze header data of the audio/video source stream toobtain configuration information of the audio/video source stream andrespectively initialize a video decoder and an audio decoder accordingto the configuration information; and a re-encoding unit, configured todecode the audio/video source stream using the initialized video decoderand audio decoder, re-encode the decoded audio/video data as a targetaudio/video stream and push the target audio/video stream to the livebroadcast server.

To achieve above purpose, in another aspect, the present disclosureprovides a transcoding device. The device includes a memory and aprocessor, where the memory is configured to store computer programs andthe above-mentioned transcoding method is implemented when the computerprograms are executed by the processor.

It can be seen from the above that, for the technical solution providedby the present disclosure, the preset encapsulation formats may bedirectly designated as the encapsulation formats of the audio/videosource streams in the protocol analysis stage of the transcodingprocess, and there may be no need to analyze the correspondingencapsulation formats according the data of the audio/video sourcestreams, so the process of protocol analysis may be eliminated. Inaddition, in the stream information analysis stage, there may be no needto wait for loading the multi-frame data of the audio/video sourcestreams, but directly analyzing the header data of the audio/videosource streams. The header data may include the audio configurationparameters and the video configuration parameters, so the process ofwaiting for loading the multi-frame data may be eliminated. Further,when configuring the frame rate for the video decoder, if an includedframe rate may not be analyzed from the header data, the decoding framerate of the video decoder may be configured as the default frame rate,which may avoid improper decoding due to the lack of the decoding framerate and may further improve the transcoding efficiency. It can be seenfrom the above, for the technical solution provided by the presentdisclosure, the transcoding process in the existing technology may beoptimized and the multiple time-consuming processes may be eliminated inthe existing technology, thereby improving the speed of the entiretranscoding stage.

BRIEF DESCRIPTION OF THE DRAWINGS

To more clearly illustrate the technical solutions of the presentinvention, the accompanying drawings to be used in the description ofthe disclosed embodiments are briefly described hereinafter. Obviously,the drawings described below are merely some embodiments of the presentinvention. Other drawings derived from such drawings may be obtained bya person having ordinary skill in the art without creative labor.

FIG. 1 illustrates a schematic diagram of a transcoding processaccording to the existing technology;

FIG. 2 illustrates a flowchart of a transcoding method for audio/videostreams according to embodiments of the present invention;

FIG. 3 illustrates a flowchart of a transcoding method including a framerate checking process according to embodiments of the present invention;

FIG. 4 illustrates a schematic diagram of functional modules of atranscoding device for audio/video streams according to embodiments ofthe present invention;

FIG. 5 illustrates a structural schematic of a transcoding device foraudio/video streams according to embodiments of the present invention;and

FIG. 6 illustrates a structural schematic of a computer terminalaccording to embodiments of the present invention.

DETAILED DESCRIPTION

To more clearly describe the objectives, technical solutions andadvantages of the present invention, the present invention is furtherillustrated in detail with reference to the accompanying drawings inconjunction with embodiments.

Embodiment 1

The present disclosure provides a transcoding method for audio/videostreams. The transcoding method may be applied to a transcoding deviceor a transcoding process. Referring to FIG. 2, the method may includethe following.

In S1: acquiring an audio/video source stream from a source server, andwhen transcoding the audio/video source stream, designating a presetencapsulation format as the encapsulation format of the audio/videosource stream.

In one embodiment, the source server may be a server that stores anoriginal audio/video stream. The original audio/video stream may be theabove-mentioned audio/video source stream. Before the audio/video sourcestream needs to be provided to a client for playing, the audio/videosource stream may be converted into a format that may be identified bythe client through a transcoding device or a transcoding progress.

In one embodiment, after acquiring the audio/video source stream, theaudio/video source stream may be transcoded according to a propertranscoding procedure, but the partial procedure may be optimized duringthe transcoding process. Specifically, when starting to transcode theaudio/video source stream, the data of the audio/video source stream maygenerally need to be analyzed to determine the encapsulation format ofthe audio/video source stream. In one embodiment, the analysis processmay be eliminated, and the preset encapsulation format may be directlydesignated as the encapsulation format of the audio/video source stream.The preset encapsulation format may be known in advance beforetranscoding the audio/video source stream. In actual applications, theencapsulation format of the audio/video source stream may generally bedetermined by the suffix name of a file. After acquiring the audio/videosource stream from the source server, the suffix name of the audio/videosource stream may be identified, so the encapsulation format indicatedby the suffix name may be used as the preset encapsulation format. Inaddition, in another application scenario, the source server may be aserver in a source node of a content delivery network (CDN). Whenmanaging the server in the source node, the CDN operator may only storethe audio/video source stream with the same encapsulation format in thesame source server; or may start to set up multiple different storageareas in the same source server and only store the audio/video sourcestream with the same encapsulation format in the same storage area. Insuch way, a corresponding relationship may be established between thesource server and the encapsulation format, or between the storage areaand the encapsulation format. When acquiring the audio/video sourcestream, the source server or the storage area where the audio/videosource stream is located may be identified, so the encapsulation formatcorresponding to the audio/video source stream may be known. In suchway, the known encapsulation format may be used as the presetencapsulation format.

According to the above-mentioned description, when acquiring theaudio/video source stream by the transcoding device or the transcodingprogress, the encapsulation format of the audio/video source stream maybe already known, so the protocol analysis stage may not be needed,thereby saving the transcoding time.

In S3: analyzing header data of the audio/video source stream to obtainconfiguration information of the audio/video source stream, andrespectively initializing a video decoder and an audio decoder accordingto the configuration information.

In one embodiment, after configuring the encapsulation format of theaudio/video source stream, the configuration information of theaudio/video source stream may need to be identified, so the videodecoder and the audio decoder may be initialized using the identifiedconfiguration information. In the existing technology, after loading themulti-frame data of the audio/video source stream, the loadedmulti-frame data may generally be analyzed to obtain the correspondingconfiguration information. However, the waiting time for loading themulti-frame data may be too long. In one embodiment, the header data ofthe audio/video source stream may be directly analyzed. The header datamay be, for example, advanced video coding (AVC) header data or advancedaudio coding (AAC) header data. The configuration information containedin different header data may also be different. Specifically, if thecurrent header data is audio header data (AAC header), an audio samplerate and an audio channel number may be extracted from the audio headerdata, and the extracted audio sample rate and audio channel number maybe used as the configuration information of audio data in theaudio/video source stream. Of course, in actual applications, the audioheader data may also include a variety of other parameters, which may benot described herein; and more configuration information may be analyzedaccording to actual requirements. The above-mentioned audio sample rateand audio channel number may be only for the convenience of describingthe technical solution of the present disclosure, but the technicalsolution of the present disclosure may not only apply to twoabove-mentioned configuration information. Those skilled in the artshould be aware that, in the case of understanding the essence of thetechnical solution of the present disclosure, extracting moreconfiguration information from the audio header data should also fallwithin the protection scope of the present disclosure.

In one embodiment, after extracting the configuration information fromthe audio header data, the extracted configuration information may beutilized to initialize the audio decoder. For example, the audio samplerate extracted from the audio header data may be configured as thedecoding sample rate of the audio decoder, so the audio decoder mayperform the decoding process properly. Of course, in actualapplications, if the extracted configuration information includes otherparameters, the audio decoder may also be configured using the otherparameters during the initialization process.

In one embodiment, if the current header data is video header data (AVCheader), a video frame resolution, a frame rate and a video format maybe extracted from the video header data, and the extracted video frameresolution, frame rate and video format may be used as the configurationinformation of video data in the audio/video source stream. Of course,Those skilled in the art should be aware that, in the case ofunderstanding the essence of the technical solution of the presentdisclosure, extracting more configuration information from the videoheader data should also fall within the protection scope of the presentdisclosure.

In one embodiment, after extracting the configuration information fromthe video header data, the extracted configuration information may beutilized to initialize the video decoder. For example, the frame rateextracted from the video header data may be configured as the decodingframe rate of the video decoder, and the above-mentioned video frameresolution may be configured as the decoding resolution of the videodecoder. In such way, the video decoder may perform a subsequentdecoding process properly. Of course, in actual applications, if theextracted configuration information includes other parameters, the videodecoder may also be configured using the other parameters during theinitialization process.

In one embodiment, considering sometimes it is possible that the framerate may not be extracted from the video header data when analyzing thevideo header data, so, if the frame rate is not configured for the videodecoder, the decoding may be performed improperly, and the transcodingprocess may not continue. In order to overcome the defect, in oneembodiment, if the frame rate may not be extracted from the video headerdata, the decoding frame rate of the video decoder may be configured asthe default frame rate. The default frame rate may be a frame rate withrelatively high compatibility and may be summarized based on the historyof transcoding records. In such way, even the frame rate may not beextracted from the video header data, the subsequent video decodingprocess may be performed properly.

Referring in FIG. 3, in one embodiment, in order to ensure that theconfigured frame rate of the initialization in the video encoder is thesame as the actual frame rate of the audio/video source stream, a framerate checking thread may be started at the stage of initializing thevideo decoder. The frame rate checking thread may be operatedasynchronously and may be executed simultaneously with the stage of thestream information analysis in the transcoding process, which may savetime in the transcoding process. Specifically, the frame rate checkingthread may count the number of video frames acquired from theaudio/video source stream within a designated duration. Then, a standardframe rate corresponding to the audio/video source stream may becalculated according to the designated duration and the acquired numberof the video frames. For example, the frame rate checking thread mayread N video frames for a period of time, and then record the timestampsof the first video frame and the last video frame of the N video framesrespectively. The difference between the two recorded timestamps mayindicate the duration corresponding to the N video frames. Of course, inactual applications, the unit of the difference between the twotimestamps may not meet the unit requirement of the frame ratecalculation. For example, the difference between the two timestamps maybe in milliseconds, while the frame rate may be calculated in seconds,so the unit of the difference between the two timestamps may beconverted to the unit used in the frame rate calculation process,thereby ensuring that the normal frame rate may be calculated finally.Then, the frame rate checking thread may determine if the calculatedstandard frame rate is consistent with the currently configured decodingframe rate in the video decoder; if not consistent, the frame rateanalyzed from the video header data may be incorrect. At this time, thecurrently configured decoding frame rate in the video decoder may bemodified to the standard frame rate, which may ensure that the decodingframe rate in the video decoder may match the actual frame rate of theaudio/video source stream and may further ensure that the video decodingprocess may be performed smoothly.

In S5: decoding the audio/video source stream using the initializedvideo decoder and audio decoder, re-encoding the decoded audio/videodata as a target audio/video stream, and pushing the target audio/videostream to the live broadcast server.

In one embodiment, after completing the initialization configuration ofthe video decoder and the audio decoder, the audio/video source streammay be decoded by the initialized video decoder and audio decoder toobtain the decoded audio/video data. Then, filter processing andencoding processing may perform on the decoded audio/video datasequentially, thereby obtaining the target audio/video stream which maybe supported by the client. The target audio/video stream may be pushedto the live broadcast server which may be a streaming media server forproviding audio/video streams to the users. Subsequently, the client maydirectly acquire the transcoded target audio/video stream from the livebroadcast server.

In one embodiment, considering that the common audio/video format in theclient is an X264 format, so the encoder used in re-encoding may be aX264 encoder. In the encoder, in order to improve the encoding speed, atarget parameter for reducing latency may be configured, and the decodedaudio/video data may be re-encoded by the encoder with the configuredtarget parameter. For example, the target parameter for reducing latencymay be the tune zero-latency parameter. After configuring the parameter,the X264 encoder may have a relatively low latency when encoding thedecoded audio/video data, thereby improving the overall speed of thetranscoding process.

In a specific application scenario, the audio/video source stream withdetermined FLV format may be acquired from the source server through theffmpeg transcoding process. In such way, when the ffmpeg transcodingprocess transcodes the audio/video source stream, the encapsulationformat may be designated as the FLV format, thereby eliminating theprotocol analysis time. Then, the ffmpeg transcoding process may receivethe AAC header or AVC header of the audio/video source stream, soincluded parameters such as the audio sample rate, the audio channelnumber, the video frame resolution, the video frame rate, the videoformat, etc. may be analyzed respectively. In such way, the waiting timefor loading at least 40 frames of data may be eliminated. Afterextracting the corresponding configuration information from the AACheader and AVC header, the audio decoder and the video decoder may beinitialized respectively using the configuration information. During theinitialization, if the video frame rate is not included in theconfiguration information, the decoding frame rate of the video decodermay be configured as the default value to avoid improper transcoding. Atthe same time of the initialization, the frame rate checking thread maybe started asynchronously. The frame rate checking thread may count thenumber of video frames acquired from the audio/video source stream witha designated duration. Then, the number of acquired video frames may bedivided by the designated duration to obtain a number of framestransmitted per unit time. The number of frames transmitted per unittime may be the actual frame rate of the audio/video source stream.Then, the frame rate checking thread may determine if the calculatedstandard frame rate is consistent with the currently configured decodingframe rate in the video decoder; if not consistent, the frame rateanalyzed from the video header data may be incorrect. At this time, thecurrently configured decoding frame rate in the video decoder may bemodified to the standard frame rate, which may ensure that the decodingframe rate in the video decoder may match the actual frame rate of theaudio/video source stream and may further ensure that the video decodingprocess may be performed smoothly. After completing the decodingprocess, the decoded audio/video data may be encoded by the X264 encoderconfigured with the tune zero-latency parameter for reducing latency, sothe target audio/video stream supported by the client may be obtained.The target audio/video stream may be pushed to a streaming media server.Subsequently, the client may acquire the transcoded target audio/videostream from the streaming media server.

Embodiment 2

Referring to FIG. 4, the present disclosure also provides a transcodingdevice for audio/video streams, where the device may include:

an encapsulation format designating unit, configured to acquire anaudio/video source stream from a source server, and designate a presetencapsulation format as an encapsulation format of the audio/videosource stream when transcoding the audio/video source stream;

a decoder initializing unit, configured to analyze header data of theaudio/video source stream, obtain configuration information of theaudio/video source stream and respectively initialize a video decoderand an audio decoder according to the configuration information; and

a re-encoding unit, configured to decode the audio/video source streamusing the initialized video decoder and audio decoder, re-encode thedecoded audio/video data as a target audio/video stream and push thetarget audio/video stream to a live broadcast server.

In one embodiment, the decoder initializing unit may include:

a video configuration information extracting module, configured toextract a video frame resolution, a frame rate and a video format if thecurrent header data is a video header data, and use the extracted videoframe resolution, frame rate and video format as the configurationinformation of video data in the audio/video source stream.

In one embodiment, the decoder initializing unit may further include:

a frame rate configurating module, configured to set the frame rateextracted from the video header data as a decoding frame rate of thevideo decoder; and set the decoding frame rate of the video decoder as adefault frame rate if the frame rate may not be extracted from the videoheader data.

In one embodiment, the device may further include:

a frame rate checking module, configured to count the number of videoframes acquired from the audio/video source stream within a designatedduration when the video decoder and the audio decoder are respectivelyinitialized according to the configuration information;

a standard frame rate calculating module, configured to calculate astandard frame rate corresponding to the audio/video source streamaccording to the designated duration and the number of acquired videoframes; and

a frame rate updating module, configured to determine if the standardframe rate is consistent with the currently configured decoding framerate in the video decoder, and modify the currently configured decodingframe rate in the video decoder to the standard frame rate if notconsistent.

In one embodiment, the re-encoding unit may include:

a parameter configurating module, configured to set a target parameterfor reducing latency in the encoder and re-encode the decodedaudio/video data using the encoder configured with the target parameter.

Referring to FIG. 5, the present disclosure also provides a transcodingdevice for audio/video streams. The device may include a memory and aprocessor. The memory is configured to store computer programs. Theabove-mentioned transcoding method for the audio/video streams may beimplemented when the computer programs are executed by the processor.

Referring to FIG. 6, in the present disclosure, the technical solutionin the above-mentioned embodiments may be applied to the computerterminal 10 shown in FIG. 6. The computer terminal 10 may include one ormore (only one is shown) processors 102 (the processor 102 may include,but not limited to, a microprocessor, a microcontroller unit (MCU) or aprogrammable logic device FPGA (field programmable gate array)), amemory 104 used to store data, a transmission module 106 used forcommunication functions. Those skilled in the art may understand thatthe structure shown in FIG. 6 is merely illustrative and are notintended to limit the structure of the above electronic device. Forexample, the computer terminal 10 may further include more or lesscomponents than shown in FIG. 6 or have different configurations fromshown in FIG. 6.

Specifically, in the present disclosure, the above-mentioned transcodingmethod of audio/video streams may be stored as a computer program in theabove-mentioned memory 104. The memory 104 may be coupled to theprocessor 102, so each step in the above-mentioned transcoding methodfor audio/video streams may be implemented when the processor 102executes the computer program in the memory 104.

The memory 104 may also be used to store software programs and modulesof application software, and the processor 102 may execute a variety offunctional applications and data processing by running the softwareprograms and modules which are stored in the memory 104. The memory 104may include high-speed random-access memory and may also includenon-volatile memory such as one or more magnetic storage devices, flashmemory or other non-volatile solid-state memory. In some examples, theprocessor 104 may further include remote memory relative to theprocessor 102 and the remote memory may be connected to the computerterminal 10 via a network. The above-mentioned network examples include,but not limited to, the Internet, enterprise intranets, local areanetworks, mobile communication networks and combinations thereof.

The transmission device 106 is used receive or transmit data via anetwork. The above-mentioned specific network examples may furtherinclude a wireless network provided by a communication provider of thecomputer terminal 10. In an example, the transmission device 106 mayinclude a network interface controller (NIC) which may communicate withthe Internet by connecting with other network devices via a basestation. In an example, the transmission device 106 may be a radiofrequency (RF) module which may communicate with the Internet via awireless method.

It can be seen from the above that, for the technical solution providedby the present disclosure, the preset encapsulation formats may bedirectly designated as the encapsulation formats of the audio/videosource streams in the protocol analysis stage of the transcodingprocess, and there may be no need to analyze the correspondingencapsulation formats according the data of the audio/video sourcestreams, so the process of protocol analysis may be eliminated. Inaddition, in the stream information analysis stage, there may be no needto wait for loading the multi-frame data of the audio/video sourcestreams, but directly analyzing the header data of the audio/videosource streams. The header data may include the audio configurationparameters and the video configuration parameters, so the process ofwaiting for loading the multi-frame data may be eliminated. Further,when configuring the frame rate for the video decoder, if included framerate may not be analyzed from the header data, the decoding frame rateof the video decoder may be configured as the default frame rate, whichmay avoid improper decoding due to the lack of the decoding frame rateand may further improve the transcoding efficiency. It can be seen fromthe above, for the technical solution provided by the presentdisclosure, the transcoding process in the existing technology may beoptimized and the multiple time-consuming processes may be eliminated inthe existing technology, thereby improving the speed of the entiretranscoding stage.

Through the descriptions of aforementioned embodiments, those skilled inthe art may clearly understand that the embodiments may be implementedby means of software in conjunction with an essential common hardwareplatform or may be simply implemented by hardware. Based on suchunderstanding, the essential part of the aforementioned technicalsolutions or the part that contribute to the prior art may be embodiedin the form of software products. The software products may be stored incomputer readable storage media, such as ROM/RAM, magnetic disk, andoptical disk, and may include a plurality of instructions to enable acomputer device (may be a personal computer, a server, or a networkdevice) to execute the methods described in various embodiments or partsof the embodiments.

The foregoing are merely certain preferred embodiments of the presentinvention and are not intended to limit the present invention. Withoutdeparting from the spirit and principles of the present invention, anymodifications, equivalent substitutions, and improvements, etc. shallfall within the scope of the present invention.

1. A method of transcoding audio/video streams, the method comprising:acquiring an audio/video source stream from a source server, and whentranscoding the audio/video source stream, designating a presetencapsulation format as a encapsulation format of the audio/video sourcestream; analyzing header data of the audio/video source stream to obtainconfiguration information of the audio/video source stream, andrespectively initializing a video decoder and an audio decoder accordingto the configuration information; and decoding the audio/video sourcestream using the initialized video decoder and audio decoder,re-encoding the decoded audio/video data as a target audio/video stream,and pushing the target audio/video stream to a live broadcast server. 2.The method according to claim 1, wherein analyzing the header data ofthe audio/video source stream to obtain the configuration information ofthe audio/video source stream includes: if current header data is audioheader data, extracting an audio sample rate and an audio channel numberfrom the audio header data, and using the extracted audio sample rateand audio channel number as the configuration information of audio datain the audio/video source stream.
 3. The method according to claim 2,wherein initializing the audio decoder according to the configurationinformation includes: configuring the audio sample rate extracted fromthe audio header data as a decoding sample rate of the audio decoder. 4.The method according to claim 1, wherein analyzing the header data ofthe audio/video source stream to obtain the configuration information ofthe audio/video source stream includes: if current header data is videoheader data, extracting a video frame resolution, a frame rate and avideo format from the video header data, and using the extracted videoframe resolution, frame rate and video format as the configurationinformation of video data in the audio/video source stream.
 5. Themethod according to claim 4, wherein initializing the video decoderaccording to the configuration information includes: configuring theframe rate extracted from the video header data as a decoding frame rateof the video decoder; and configuring the decoding frame rate of thevideo decoder as a default frame rate if the frame rate is unable to beextracted from the video header data.
 6. The method according to claim1, wherein the method further includes: counting a number of videoframes acquired from the audio/video source stream within a designatedduration when the video decoder and the audio decoder are respectivelyinitialized according to the configuration information; calculating astandard frame rate corresponding to the audio/video source streamaccording to the designated duration and the number of acquired videoframes; and determining if the standard frame rate is consistent with acurrently configured decoding frame rate in the video decoder andmodifying the currently configured decoding frame rate in the videodecoder as the standard frame rate if not consistent.
 7. The methodaccording to claim 1, wherein, when re-encoding the decoded audio/videodata as the target audio/video stream, the method further includes:configuring a target parameter for reducing latency in an encoder andre-encoding the decoded audio/video data using the encoder configuredwith the target parameter.
 8. A device of transcoding audio/videostreams, the device comprising: a encapsulation format designating unit,configured to acquire an audio/video source stream from a source server,and designate a preset encapsulation format as a encapsulation format ofthe audio/video source stream when transcoding the audio/video sourcestream; a decoder initializing unit, configured to analyze header dataof the audio/video source stream to obtain configuration information ofthe audio/video source stream and respectively initialize a videodecoder and an audio decoder according to the configuration information;and a re-encoding unit, configured to decode the audio/video sourcestream using the initialized video decoder and audio decoder, re-encodethe decoded audio/video data as a target audio/video stream and push thetarget audio/video stream to the live broadcast server.
 9. The deviceaccording to claim 8, wherein the decoder initializing unit includes: avideo configuration information extracting module, configured to extracta video frame resolution, a frame rate and a video format if the currentheader data is video header data, and use the extracted video frameresolution, frame rate and video format as the configuration informationof video data in the audio/video source stream.
 10. The device accordingto claim 9, wherein the decoder initializing unit includes: a frame rateconfigurating module, configured to set the frame rate extracted fromthe video header data to a decoding frame rate of the video decoder; andset the decoding frame rate of the video decoder to a default frame rateif the frame rate may not be extracted from the video header data. 11.The device according to claim 8, wherein the device further includes: aframe rate checking module, configured to count a number of video framesacquired from the audio/video source stream within a designated durationwhen the video decoder and the audio decoder are respectivelyinitialized according to the configuration information; a standard framerate calculating module, configured to calculate a standard frame ratecorresponding to the audio/video source stream according to thedesignated duration and the number of acquired video frames; and a framerate updating module, configured to determine if the standard frame rateis consistent with the currently configured decoding frame rate in thevideo decoder and modify the currently configured decoding frame rate inthe video decoder to the standard frame rate if not consistent.
 12. Thedevice according to claim 8, wherein the re-encoding unit includes: aparameter configurating module, configured to set a target parameter forreducing latency in the encoder and re-encode the decoded audio/videodata using the encoder configured with the target parameter.
 13. Adevice of transcoding audio/video streams, wherein the device includes:a memory and a processor, wherein the memory is configured to storecomputer programs, and when executing the computer programs, theprocessor is configured to perform the transcoding method according toclaim 1.